import {Login} from '@/api/user'

const state = {
    list:[{
        name:"用户管理",
        icon:"el-icon-user-solid",
        id:1
    },{
        name:"小组管理",
        icon:"el-icon-menu",
        id:2
    },{
        name:"动态管理",
        icon:"el-icon-notebook-1",
        id:3
    },{
        name:"代祷事项",
        icon:"el-icon-loading",
        id:4
    },{
        name:"奉献",
        icon:"el-icon-s-promotion",
        id:5
    },{
        name:"意见反馈",
        icon:"el-icon-document-remove",
        id:6
    },{
        name:"礼品管理",
        icon:"el-icon-message-solid",
        id:7
    },{
        name:"留言管理",
        icon:"el-icon-tickets",
        id:8
    },{
        name:"投票管理",
        icon:"el-icon-chat-square",
        id:9
    },{
        name:"生日分享",
        icon:"el-icon-alarm-clock",
        id:10
    },{
        name:"异常页面",
        icon:"el-icon-heavy-rain",
        id:11
    }]
}

const mutations = {
    SET_TOKEN:(state,payload)=>{
        console.log(payload)
    }
}
const actions = {
    login({commit,rootState},payload){
        return new Promise((resolve,reject)=>{
            Login(payload).then(res=>{
                console.log(res)
            })
        })
    }
}
export default {
    state,mutations,actions,namespaced:true
}